import type { MaterialIF, PictureUploadIF } from './type';

import { requestClient } from '#/api/request';

// 车型接口定义
export interface CarIF {
  innerName: string;
  companyIdList: string[];
  baseInfo: {
    area: string;
    showName: string;
  }[];
  imgObjectKeys: string;
}

// Tag List
export async function tagListApi(data: any) {
  return requestClient.get('/tag/list', data);
}

// 素材查询
export async function getMaterialApi(data: MaterialIF) {
  return requestClient.get('/material/list', data);
}

// 添加图片素材
export async function PictureAddApi(data: PictureUploadIF) {
  return requestClient.post('/material/backend/image/upload', data);
}

// 添加视频素材
export async function VideoAddApi(data) {
  return requestClient.post('/video/upload', data);
}

// 视频列表
export async function VideoListApi(data) {
  return requestClient.get('/video/list', data);
}

// 视频删除
export async function VideoDeleteApi(data) {
  return requestClient.post('/video/delete', data);
}

// 视频编辑
export async function VideoEditApi(data) {
  return requestClient.post('/video/edit', data);
}

// 车型添加
export async function CarAddApi(data) {
  return requestClient.post('/car/add', data);
}

// 车型修改
export async function CarUpdateApi(data) {
  return requestClient.post('/car/update', data);
}

// 车型列表
export async function CarListApi(data) {
  return requestClient.get('/car/list', data);
}
// 车型列表Select
export async function CarSelectApi(data) {
  return requestClient.get('/car/listSimple', data);
}
